{% extends 'generic/object_retrieve.html' %}
{% load helpers %}

{% block content_left_page %}
    <div class="card">
        <div class="card-header">
            <strong>Device Bay</strong>
        </div>
        <table class="table table-hover card-body attr-table">
            <tr>
                <td>Device</td>
                <td>{{ object.device|hyperlinked_object }}</td>
            </tr>
            <tr>
                <td>Name</td>
                <td>{{ object.name }}</td>
            </tr>
            <tr>
                <td>Label</td>
                <td>{{ object.label|placeholder }}</td>
            </tr>
            <tr>
                <td>Description</td>
                <td>{{ object.description|placeholder }}</td>
            </tr>
        </table>
    </div>
{% endblock content_left_page %}

{% block content_right_page %}
    <div class="card">
        <div class="card-header">
            <strong>Installed Device</strong>
        </div>
        {% if object.installed_device %}
            {% with device=object.installed_device %}
                <table class="table table-hover card-body attr-table">
                    <tr>
                        <td>Device</td>
                        <td>{{ device|hyperlinked_object }}</td>
                    </tr>
                    <tr>
                        <td>Device Type</td>
                        <td>{{ device.device_type }}</td>
                    </tr>
                </table>
            {% endwith %}
        {% else %}
            <div class="card-body text-secondary">
                None
            </div>
        {% endif %}
    </div>
{% endblock content_right_page %}
